
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加商品</title>
<%--    <link rel="stylesheet" href="../css/bootstrap.css">--%>
<%--    <script src="../js/bootstrap.js"></script>--%>
<%--    <script src="../js/jquery-3.5.1.js"></script>--%>
    <script src="../js/addgoods.js"></script>
    <style>
        #formbox{
            margin: 0px auto;
            width: 1010px;
            height: 720px;
            border: 3px solid rgb(235,238,245);
        }
        form{
            width: 500px;
            height: 720px;
             float: left;
        }
        .form-control{
            width: 200px;
        }
        #phoneparameter,#tvparameter,#notebookparameter,#phonesubmit,#tvsubmit,#notebooksubmit{
            display: none;
        }
        #submit{
            display: none;
        }
    </style>
</head>
<body>
<div class="container-fluid">

    <div id="formbox">

        <form class="form-horizontal" id="goods">
            <input type="hidden" id="method" value="addGoods">
            <h3>请填写商品信息：</h3>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">商品名称</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="name" placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">商品分类</label>
                <div class="col-sm-10">
                    <select class="form-control" id="category">
                        <option>请选择</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">颜色</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="color" placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">价格</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="price" placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">库存</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inventory" placeholder="请输入">
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">图片上传</label>
                <div class="col-sm-10">
                    <input type="file" id="picture">
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">描述</label>
                <div class="col-sm-10">
                    <textarea class="form-control" id="description" rows="3"></textarea>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-default">下一步</button>
                </div>
            </div>

            <div class="form-group" id="submit">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-success">提交</button>
                </div>
            </div>

            <div class="form-group" id="phonesubmit">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-success">提交</button>
                </div>
            </div>

            <div class="form-group" id="tvsubmit">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-success">提交</button>
                </div>
            </div>

            <div class="form-group" id="notebooksubmit">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="button" class="btn btn-success">提交</button>
                </div>
            </div>

        </form>

        <form class="form-horizontal" id="phoneparameter">
            <h3>请填写手机参数：</h3>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕尺寸</label>
                <div class="col-sm-10">
                    <select class="form-control" id="phonescreensize">
                        <option>超大屏</option>
                        <option>中小屏</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">拍照像素</label>
                <div class="col-sm-10" >
                    <select class="form-control" id="pixel">
                        <option>四摄像头</option>
                        <option>三摄像头</option>
                        <option>双摄像头</option>
                        <option>高清拍摄</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">内存</label>
                <div class="col-sm-10">
                    <select class="form-control" id="phonememory">
                        <option>极速畅玩</option>
                        <option>高速</option>
                        <option>流畅</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">电量</label>
                <div class="col-sm-10">
                    <select class="form-control" id="batterylife">
                        <option>超长待机</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">cpu型号</label>
                <div class="col-sm-10">
                    <select class="form-control" id="cpumodel">
                        <option>Helio</option>
                        <option>G25Helio</option>
                        <option>G80天玑820</option>
                        <option>骁龙865</option>
                        <option>骁龙765G</option>
                        <option>骁龙730G</option>
                        <option>天玑1000+旗舰处理器</option>
                        <option>G25Helio</option>
                        <option>G80天玑820</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">cpu主频</label>
                <div class="col-sm-10">
                    <select class="form-control" id="cpufrequency">
                        <option>最高2.2HZ</option>
                        <option>最高2.05HZ</option>
                        <option>最高2.84HZ</option>
                        <option>最高2.6HHZ</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">前置摄像头</label>
                <div class="col-sm-10">
                    <select class="form-control" id="frontcamera">
                        <option>500万像素</option>
                        <option>800万像素</option>
                        <option>1300万像素</option>
                        <option>1600万像素</option>
                        <option>2000万像素</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕分辨率</label>
                <div class="col-sm-10">
                    <select class="form-control" id="phonescreenresolution">
                        <option>1600×720</option>
                        <option>1080×2400</option>
                        <option>1080×2340</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">存储容量</label>
                <div class="col-sm-10">
                    <select class="form-control" id="capacity">
                        <option>32G</option>
                        <option>64G</option>
                        <option>128G</option>
                        <option>256G</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">机身厚度</label>
                <div class="col-sm-10">
                    <select class="form-control" id="phonethickness">
                        <option>普通厚度</option>
                        <option>超薄</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">网络类型</label>
                <div class="col-sm-10">
                    <select class="form-control" id="networktype">
                        <option>4G全网通</option>
                        <option>5G全网通</option>
                        <option>全网通5.0</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">网络模式</label>
                <div class="col-sm-10">
                    <select class="form-control" id="networkmodel">
                        <option>4G</option>
                        <option>双卡双待</option>
                    </select>
                </div>
            </div>

        </form>

        <form class="form-horizontal" id="tvparameter">
            <h3>请填写电视参数：</h3>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕尺寸</label>
                <div class="col-sm-10">
                    <select class="form-control" id="tvscreensize">
                        <option>70及以上</option>
                        <option>55-65</option>
                        <option>55-65</option>
                        <option>45-55</option>
                        <option>40以下</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">系列</label>
                <div class="col-sm-10" >
                    <select class="form-control" id="tvseries">
                        <option>人气爆棚</option>
                        <option>高端旗舰</option>
                        <option>全面屏系列</option>
                        <option>壁画系列</option>
                        <option>主流系列</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">遥控方式</label>
                <div class="col-sm-10">
                    <select class="form-control" id="remote">
                        <option>蓝牙语音</option>
                        <option>红外遥控</option>
                        <option>远场语音</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">边框材质</label>
                <div class="col-sm-10">
                    <select class="form-control" id="border">
                        <option>塑料</option>
                        <option>金属</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕分辨率</label>
                <div class="col-sm-10">
                    <select class="form-control" id="tvscreenresolution">
                        <option>4K超高清</option>
                        <option>超高清</option>
                        <option>高清</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">USB</label>
                <div class="col-sm-10">
                    <select class="form-control" id="usb">
                        <option>1个</option>
                        <option>2个</option>
                        <option>3个</option>
                    </select>
                </div>
            </div>

        </form>

        <form class="form-horizontal" id="notebookparameter">
            <h3>请填写笔记本参数：</h3>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕尺寸</label>
                <div class="col-sm-10">
                    <select class="form-control" id="notebookscreensize">
                        <option>较大</option>
                        <option>中等</option>
                        <option>小屏</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">CPU</label>
                <div class="col-sm-10">
                    <select class="form-control" id="cpu">
                        <option>inter i5</option>
                        <option>inter i7</option>
                        <option>inter m3</option>
                        <option>AMD R7</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">series</label>
                <div class="col-sm-10">
                    <select class="form-control" id="notebookseries">
                        <option>独立显卡</option>
                        <option>集成显卡</option>
                        <option>集显</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">厚度</label>
                <div class="col-sm-10">
                    <select class="form-control" id="notebookthickness">
                        <option>正常厚度</option>
                        <option>便携轻薄</option>
                    </select>
                </div>
            </div>


            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">固态硬盘</label>
                <div class="col-sm-10">
                    <select class="form-control" id="harddisk">
                        <option>125</option>
                        <option>256</option>
                        <option>512</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">可扩展硬盘</label>
                <div class="col-sm-10">
                    <select class="form-control" id="extensiondisk">
                        <option>支持</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">内存容量</label>
                <div class="col-sm-10">
                    <select class="form-control" id="notebookmemory">
                        <option>超大内存</option>
                        <option>大内存</option>
                        <option>内存</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">屏幕分辨率</label>
                <div class="col-sm-10">
                    <select class="form-control" id="notebookscreenresolution">
                        <option>全高清屏</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">待机时长</label>
                <div class="col-sm-10">
                    <select class="form-control" id="standbytime">
                        <option>>9</option>
                        <option>>12</option>
                        <option>>15</option>
                        <option>>20</option>
                    </select>
                </div>
            </div>


            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">重量</label>
                <div class="col-sm-10">
                    <select class="form-control" id="weight">
                        <option>1.0~1.3</option>
                        <option>>1.3</option>
                        <option>>1.5</option>
                        <option>>2.0</option>
                    </select>
                </div>
            </div>
        </form>

    </div>

</div>
</body>
<script>
    $(document).ready(function () {

        //列出分类内容
        listCategory();

        $("button").click(function(){
            var category = $("#category").val()

            if(category==1){
                $("#phoneparameter").show();
                $("#phonesubmit").show();
                $("#tvparameter").hide();
                $("#notebookparameter").hide();
            }else if(category==2){
                $("#tvparameter").show();
                $("#tvsubmit").show();
                $("#phoneparameter").hide();
                $("#notebookparameter").hide();
            }else if(category==3){
                $("#notebookparameter").show();
                $("#notebooksubmit").show();
                $("#phoneparameter").hide();
                $("#tvparameter").hide();
            }else{
                $("#submit").show();
            }
        });

        $("#submit").click(function(){
            sumbmit();
        });

        $("#phonesubmit").click(function(){
            phonesubmit();
        });

        $("#tvsubmit").click(function(){
            tvsubmit()
        });

        $("#notebooksubmit").click(function(){
            notebooksubmit();
        });

    })
</script>
</html>